{% extends "help/index.html" %}


{% block contentblock %}
    <div class="article">
        <div class="title">
            <div class="title-text">通知购买成功<span
                    class="update-time"><i>更新时间:</i><i>2019-11-20</i></span></div>
        </div>
        <div class="content">
            <h2>通知购买成功</h2>
            <h3>接口</h3>
            <code>/baidu_dueros/order_callback</code>
            <h5 id="参数">参数</h5>
            <table>
                <thead>
                <th>位置</th>
                <th>字段名</th>
                <th>类型</th>
                <th>是否必填</th>
                <th>描述</th>
                </thead>
                <tbody>
                <tr>
                    <td>http header</td>
                    <td>Authorization</td>
                    <td>String</td>
                    <td>是</td>
                    <td>Bearer + 空格 + 生成的用户access token</td>
                </tr>
                <tr>
                    <td>http body</td>
                    <td>sellerOrderId</td>
                    <td>String</td>
                    <td>是</td>
                    <td>资源方内部订单ID</td>
                </tr>
                <tr>
                    <td>http body</td>
                    <td>baiduOrderReferenceId</td>
                    <td>String</td>
                    <td>是</td>
                    <td>度秘订单ID</td>
                </tr>
                <tr>
                    <td>http body</td>
                    <td>successTime</td>
                    <td>int</td>
                    <td>是</td>
                    <td>付款成功时间，unix时间戳</td>
                </tr>
                <tr>
                    <td>http body</td>
                    <td>sellerAmount</td>
                    <td>int</td>
                    <td>是</td>
                    <td>创建订单时资源提供方的价格，单位分</td>
                </tr>
                <tr>
                    <td>http body</td>
                    <td>payAmount</td>
                    <td>int</td>
                    <td>是</td>
                    <td>度秘实际收款，单位为</td>
                </tr>
                </tbody>
            </table>
            <h4 id="返回值">返回值</h4>
            <table>
                <thead>
                <th>字段名</th>
                <th>类型</th>
                <th>必填</th>
                <th>描述</th>
                </thead>
                <tbody>
                <tr>
                    <td>errno</td>
                    <td>int</td>
                    <td>是</td>
                    <td>错误码</td>
                </tr>
                <tr>
                    <td>message</td>
                    <td>String</td>
                    <td>是</td>
                    <td>接口返回状态的描述信息</td>
                </tr>
                <tr>
                    <td>data</td>
                    <td>String</td>
                    <td>是</td>
                    <td>内容json</td>
                </tr>
                <tr>
                    <td>data.baiduOrderReferenceId</td>
                    <td>String</td>
                    <td>是</td>
                    <td>度秘订单ID</td>
                </tr>
                </tbody>
            </table>
            <h4 id="实例">实例</h4>
            <pre><code>
curl --dump-header - -H "Authorization: Bearer baidu" -H "Accept: application/json" -H "Content-Type: application/json" -X POST --data "{\"sellerOrderId\":\"\",\"baiduOrderReferenceId\":\"\",\"successTime\":\"\",\"sellerAmount\":0,\"payAmount\":0,\"\":0}" https://wweb.yourhost.com/baidu_dueros/order_callback
{"errno": "10", "message": "user must login"}
curl --dump-header - -H "Authorization: Bearer Rj9tsh2nmHRupXckxBCTAM3sPbUgdA" -H "Accept: application/json" -H "Content-Type: application/json" -X POST --data "{\"sellerOrderId\":\"\",\"baiduOrderReferenceId\":\"\",\"successTime\":\"\",\"sellerAmount\":0,\"payAmount\":0,\"\":0}" https://wweb.yourhost.com/baidu_dueros/order_callback
{"errno": "0", "message": "success", "data": {"baiduOrderReferenceId": ""}}
            </code></pre>
        </div>
    </div>
{% endblock contentblock %}